<?php

use Illuminate\Http\Request;

/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/

Route::group(['namespace'=>'Admin','middleware'=>['web']],function($route){
    $route->get('index','LoginController@index');
    $route->post('login','LoginController@login');
    $route->any('logout','LoginController@loginout');

    Route::resource('posts', 'PostController')->names('admin.post'); //admin.post.create delete [pui
    Route::resource('admin', 'AdminController');
    Route::resource('permissions', 'PermissionController');
    Route::resource('roles', 'RoleController');
});